package com.sinai.mshab.widgets;

import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;

/**
 * This is a header panel intneded to be used in a {@link Menu} to explain the
 * grouping of {@link MenuButton}s
 * 
 * @author serge
 * 
 */
public class MenuHeader extends HorizontalPanel {

	/**
	 * Creates a new menu header.
	 * @param text the text of the header.
	 */
	public MenuHeader(String text) {
		setStyleName("mshab-MenuHeader");
		setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
		add(new Label(text));
	}
}
